x86/vmx: Support for CPUs without model-specific LBR
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 7 Feb 2023 15:59:14 +0000 (16:59 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Feb 2023 15:59:14 +0000 (16:59 +0100)
commite904d8ae01a0be53368c8c388f13bf4ffcbcdf6c
tree31804b4974e05abaad22d4139fa1ea30e333bb85
parent5e3250258afbace3e5dc3f31ac99c1eebf60f238
x86/vmx: Support for CPUs without model-specific LBR

Ice Lake (server at least) has both architectural LBR and model-specific LBR.
Sapphire Rapids does not have model-specific LBR at all.  I.e. On SPR and
later, model_specific_lbr will always be NULL, so we must make changes to
avoid reliably hitting the domain_crash().

The Arch LBR spec states that CPUs without model-specific LBR implement
MSR_DBG_CTL.LBR by discarding writes and always returning 0.

Do this for any CPU for which we lack model-specific LBR information.

Adjust the now-stale comment, now that the Arch LBR spec has created a way to
signal "no model specific LBR" to guests.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
master commit: 3edca52ce736297d7fcf293860cd94ef62638052
master date: 2023-01-12 18:42:00 +0000
xen/arch/x86/hvm/vmx/vmx.c